import request from './index';
//获取验证码的接口
const validCode= (data)=>{
  return request.get('/validCode', data);
};
//注册账号的接口
const register = (data) => {
  return request.put('/register', data)
};
//登录账号的接口
const login=(data)=>{
  return request.post('/login',data)
};
//添加收货地址的接口
const address=(data)=>{
  return request.get('/addr',data);
};
//推荐首页轮播的接口
const swiper= (data)=>{
  return request.get('/banner',data)
};
//获取商品的接口
const prod=(data)=>{
  return request.get('/prod',{params:data})
};
//获取秒杀商品的接口
const secKill=(data)=>{
  return request.get('/secKill',data)
};
//全国地址接口
const region=(data)=>{
  return request.post('http://www.mxnzp.com/api/address/list',data);
};


export default {validCode,register,login,address,swiper,region,prod,secKill};
